Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom GitHub API urls (for GHES support) #53

Merged
merged 2 commits into from
May 30, 2023
Merged

Add support for custom GitHub API urls (for GHES support) #53

merged 2 commits into from
May 30, 2023

Conversation

AdnaneKhan
Copy link
Contributor

This PR adds support for a custom GitHub API url argument for both the scan and github commands. This allows NP to support GitHub Enterprise Server (by passing https://GHESURL/api/v3/ as the custom API url).

@bradlarsen bradlarsen self-requested a review May 30, 2023 16:01
Copy link
Collaborator

@bradlarsen bradlarsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good; thanks for the contribution @AdnaneKhan !

I made a few refinements:

  • Added test cases for the URL joining code
  • Made the URL joining code more robust after testing
  • Expanded the command-line help documentation for the new --api-url arguments
  • Switched the --api-url argument type from String to Url

@bradlarsen bradlarsen merged commit 5a46fc9 into praetorian-inc:main May 30, 2023
@bradlarsen bradlarsen added the content discovery Related to enumerating or specifying content to scan label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content discovery Related to enumerating or specifying content to scan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants